package lr.com.demo.dao.impl;

import lr.com.demo.dao.IRedisDao;

import org.springframework.data.redis.core.RedisTemplate;

public class RedisDaoImpl implements IRedisDao {
	private RedisTemplate<String, Object> redisTemplate ;

	public RedisTemplate<String, Object> getRedisTemplate() {
		return redisTemplate;
	}

	public void setRedisTemplate(RedisTemplate<String, Object> redisTemplate) {
		this.redisTemplate = redisTemplate;
	}
	
	public void sendMessage(String channel,String message)throws Exception{
		redisTemplate.convertAndSend(channel, message);
	}

}
